from flask import Flask
from flask_restx import Api
from .multi_account.views import multi_account_ns


def create_app():
    app = Flask(__name__)
    api = Api(app, title='My API', version='1.0', description='A simple API')

    # 添加 Namespace 到 Api 实例
    api.add_namespace(multi_account_ns, path='/multi_account')

    return app
